/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.registration.core;

import com.registration.Persistent;

/**
 *
 * @author giovanella
 * @date Sep 8, 2014
 */
public class RoomPlan implements Persistent {
    private Long id;
    private Hotel hotel;
    private String name;
    private Integer beds;
    private Float price;

    public RoomPlan() {
    }

    public RoomPlan(Hotel hotel, String name, Integer beds, Float price) {
        this.hotel = hotel;
        this.name = name;
        this.beds = beds;
        this.price = price;
    }   

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Hotel getHotel() {
        return hotel;
    }

    public void setHotel(Hotel hotel) {
        this.hotel = hotel;
    }        

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getBeds() {
        return beds;
    }

    public void setBeds(Integer beds) {
        this.beds = beds;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }
    
    @Override
    public int hashCode() {
        return id.hashCode();
    }
    
    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof RoomPlan)) {
            return false;
        }
        RoomPlan _i = (RoomPlan) other;
        return id != null ? id.equals(_i.id) : false;
    }
}
